﻿using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
namespace WPFExcelReport
{
    /// <summary>
    /// Interaction logic for Machine.xaml
    /// </summary>

    public partial class TMON
    {
        public TMON()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return; 
            InitializeComponent(); 
        } 

        DataRowView rowv;
        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            if (IsLoaded)
                return;
             
            //base.Window_Loaded(sender, e); 
            if (DataContext != null)
            {
                rowv = DataContext as DataRowView;
                dwData = rowv.Row;
                MKEY = dwData["MACHINEID"].ToString();
                StartMonitoring(); 
            } 
        } 
        public override void LOADBYAUF()
        {
            if (ORDERNUM.Length < 8)
                return;
            MKEY = ORDERNUM;
            StartMonitoring();
            base.LOADBYAUF();
        }
        public override void vwMaster_CurrentChanged(object sender, EventArgs e)
        {
            base.vwMaster_CurrentChanged(sender, e);
             
        }
        public override void StartMonitoring()
        {
            base.StartMonitoring();
        } 
    }
}
